gen conventional_loan = 100*(loan_type==1)
gen white = 100*(race_1==1)
gen black = 100*(race_1 == 2)
gen urban = 100*(inlist(rucc2013,"01","02"))
gen male = 100*(gender_1==1)

/*
gen month_sample_drawn      = 205 if survey_year==2016 //Month 205 is 1/1/2015
replace month_sample_drawn  = 217 if survey_year==2017 //Month 228 is 1/1/2016
replace  month_sample_drawn = 229 if survey_year==2018 //Month 240 is 1/1/2017
*/

gen mortgage_age = month_sample_drawn - open_month



* Scale some variables
foreach var in income med_income_hmda_2019 value loan_amt {
	replace `var' = `var'/1000
}

replace arm = 100 * arm
replace ethnic_1 = 100 * ethnic_1

